package com.java.Collection.List.LinkedList.source_analyze;

import com.java.Collection.List.LinkedList.source_analyze.source_code.LinkedList;

import java.util.Arrays;

public class Main {
    public static void println(LinkedList list) {
        int size = list.size();
        for (int i = 0; i < size; i++) {
            System.out.print(list.get(i) + " ");
        }
        System.out.println();
    }
    
    public static void main(String[] args) {
        LinkedList list1 = new LinkedList();
        list1.add(1);
        list1.add(2);
        
        LinkedList list2 = new LinkedList(Arrays.asList(1, 2, 3, 4, 5, 6, 7));
        list2.addAll(0, Arrays.asList("A", "A"));
        list2.addAll(2, Arrays.asList("B", "B"));
        
        println(list2); // A A B B 1 2 3 4 5 6 7
    }
}
